<script setup lang="ts">
const checkItemList = ref<Array<any>>([
    {
        name: '基础体检套餐',
        img: 'https://img.yuntongjiankang.com/2021111418192116093.jpg',
        price: '206',
        detail: '全民体检|关注健康',
        count:1253
    },
    {
        name: '珍爱父母套餐',
        img: 'https://img.yuntongjiankang.com/2021111417220192000.jpg',
        price: '608',
        detail: '关爱父母健康',
        count:896
    },
    {
        name: '健康证体检套餐',
        img: 'https://img.yuntongjiankang.com/2023123116081196266.jpg',
        price: '75',
        detail: '团队体检，仅限8人以上使用',
        count:52
    },
    {
        name: '基础体检套餐',
        img: 'https://img.yuntongjiankang.com/2021111418192116093.jpg',
        price: '206',
        detail: '全民体检|关注健康',
        count:1253
    },
    {
        name: '珍爱父母套餐',
        img: 'https://img.yuntongjiankang.com/2021111417220192000.jpg',
        price: '608',
        detail: '关爱父母健康',
        count:896
    },
    {
        name: '健康证体检套餐',
        img: 'https://img.yuntongjiankang.com/2023123116081196266.jpg',
        price: '75',
        detail: '团队体检，仅限8人以上使用',
        count:52
    }
])
const handleProductClick = (id: any) => {
    console.log('产品详情：' + id)
}
const handleBack = ()=>{
    uni.navigateTo({
        url:'/pages/index/index'
    })
}
</script>
<template>
    <view class="body-check">
        <view class="show-pad">
            <view class="title">
                <view class="back" @click="handleBack">
                    <up-icon name="arrow-left" size="24" color="#fff"></up-icon>
                </view>
                <view class="search">
                    <up-input placeholder="请输入搜索内容">
                        <template #prefix>
                            <up-icon name="search" size="22"></up-icon>
                        </template>
                    </up-input>
                </view>
                <view class="operate">
                    <up-icon name="share-square" label="分享" labelPos="bottom" size="24" :labelSize="12" labelColor="#fff"
                        color="#fff"></up-icon>
                </view>
            </view>
            <view class="hos-info">
                <view class="imghead"></view>
                <view class="info">
                    <view class="name">洪洞晋南医院</view>
                    <view class="address">地址：山西省洪洞县霍侯一级路客运站对面</view>
                    <view class="time">营业时间：7:40至12:00(9点停止采血)</view>
                    <view class="phone">咨询电话：0357-5558120</view>
                </view>
            </view>
            <view class="content">
                <view class="other-info">
                    <view class="meta"><svg-icon name="doctor" width="20" height="20" />名医坐诊</view>
                    <view class="meta"><svg-icon name="device" width="20" height="20" />先进仪器</view>
                    <view class="meta"><svg-icon name="flower" width="20" height="20" />一流服务</view>
                    <view class="meta"><svg-icon name="save" width="20" height="20" />信誉保障</view>
                </view>
                <view class="list">
                    <view class="item" v-for="item, index in checkItemList" :key="index" @click="handleProductClick(index)">
                        <view class="thumbnail" :style="{ backgroundImage: 'url(' + item.img + ')' }"></view>
                        <view class="info">
                            <view class="name">{{ item.name }}</view>
                            <view class="detail">{{ item.detail }}</view>
                            <view class="price">¥{{ item.price }}</view>
                            <view class="count">已售{{ item.price }}</view>
                        </view>
                    </view>
                    <view class="total">- 共有{{checkItemList.length}}个产品 -</view>
                    <view style="height:40px;"></view>
                </view>
            </view>
        </view>
    </view>
</template>
<style lang="scss">
.body-check {
    width: 100vw;
    height: 100vh;
    background-color: #e1e1e1;
    overflow: hidden;

    .show-pad {
        width: 100%;
        background: linear-gradient(to bottom, #009966, #e1e1e1);
        height: 50vh;

        .title {
            width: 100vw;
            height: 60px;
            display: flex;
            flex-direction: row;
            align-items: center;

            .back {
                width: 35px;
                padding-left: 6px;
                color: #000;
            }

            .search {
                width: 75vw;
                .u-input {
                    background-color: #e1e1e1;
                }
            }

            .operate {
                padding: 0 5px;
            }
        }

        .hos-info {
            width: 95vw;
            height: 25vw;
            margin: 20px auto;
            display: flex;

            .imghead {
                width: 25vw;
                height: 25vw;
                border-radius: 25vw;
                background-color: #000;
                background-image: url('/static/imgs/temp/hospital.jpg');
                background-size: 100% 100%;
            }

            .info {
                flex-grow: 1;
                margin-left: 10px;
                font-size: 13px;
                height: 25vw;
                color: #222;
                display: flex;
                flex-direction: column;
                

                .name {
                    flex:3;
                    color: #fff;
                    font-size: 18px;
                    font-weight: bold;
                    letter-spacing: 1px;
                }

                .address {
                    flex:2;
                }

                .time {
                    flex:2;
                }

                .phone {
                    flex:2;
                }
            }
        }

        .content {
            width: 95vw;
            min-height: 300px;
            background-color: #fff;
            margin: 20px auto 0 auto;

            .other-info {
                width: 100%;
                height: 40px;
                display: flex;
                align-items: center;
                color: #555;
                flex-direction: row;
                font-weight: bold;
                font-size: 15px;

                .meta {
                    flex: 1;
                    text-align: center;

                    .svg-icon {
                        color: #0099CC;
                    }
                }
            }

            .list {
                width:100%;
                height:calc(100vh - 220px);
                overflow: scroll;
                .item {
                    width: 100%;
                    min-height: 70px;
                    display: flex;
                    flex-direction: row;
                    align-items: center;

                    .thumbnail {
                        width: 30vw;
                        height: 30vw;
                        background-color: #ccc;
                        margin: 10px;
                        background-position: center;
                        background-repeat: no-repeat;
                        background-size: 100%;
                    }

                    .info {
                        display: flex;
                        height:30vw;
                        flex-direction: column;
                        flex-grow: 1;
                        margin-left: 10px;

                        .name {
                            flex:2;
                            padding-bottom: 5px;
                            font-weight: bold;
                        }

                        .detail {
                            flex:2;
                            color: #666;
                            font-size: 12px;
                        }

                        .price {
                            flex:2;
                            width: 50px;
                            color: #CC3333;
                            font-weight: bold;
                            font-size:18px;
                        }
                        .count{
                            flex:1;
                            color:#999;
                            font-size: 12px;
                        }
                    }



                }

                .total{
                    text-align: center;
                    color:#555;
                    font-size:14px;
                    padding:12px 0;
                }
            }
        }
    }

}
</style>
<style lang="scss" scoped></style>